package edu.uj.petri.view;

import java.awt.Color;
import java.awt.Component;
import java.awt.Point;
import java.awt.geom.Dimension2D;
import java.awt.geom.Point2D;
import java.awt.geom.Rectangle2D;
import java.util.List;

/**
 * class responsible for drawing basic shapes. Canvas is not aware what it in fact
 * draws, it only gives methods to draw certain shapes.
 *
 * <p>All coordinates (points, rectangles etc.) are given in abstract <strong>units</strong>
 * from Canvas. There are two separate units: Units (for lines, circles etc.)
 * and FontUnits (for text).</p>
 */
public interface Canvas {
    
   // public void drawLine(java.awt.geom.Rectangle2D rectangle, java.awt.Color color);
    public void drawLine(double x1,double y1,double x2, double y2, java.awt.Color color);
            
    //public void drawCircle( Rectangle2D rect, Color color );
    public void drawCircle(java.awt.geom.Rectangle2D rectangle, java.awt.Color color, boolean filled);
    
    public void drawPolygon( List<Point2D> points);
    
    public void drawText(String s, Point2D position);
    
    public void drawRectangle(java.awt.geom.Rectangle2D rectangle, java.awt.Color color,boolean filled);
    
    public void clear();
    
    public Point2D convertScreenToCanvas( int x, int y);
    public Point convertCanvasToScreen( double x, double y);
    
    // stworzyłem klasę utils.DoubleDimension do zwracania wyników
    //public Dimension2D getTextSize(String s);
    
    public Component getComponent();
    
}
